package com.yunhe.policyfulfillment.policyful.repository;

import com.yunhe.policyfulfillment.policyful.domain.PolicyInfoDeclareMaterial;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName IPolicyInfoDeclareMaterial
 * @Description TODO
 * @Author HeTao
 * @Date 2021/7/26 14:16
 * @Version 1.0
 **/
@Repository
public interface IPolicyInfoDeclareMaterialRepository {


    /**
     * 新增
     * @author hetao
     * @date 2021/07/26
     **/
    int createPolicyInfoDeclareMaterial(PolicyInfoDeclareMaterial policyInfoDeclareMaterial);

    /**
     * 新增
     * @author hetao
     * @date 2021/07/26
     **/
    int createPolicyInfoDeclareMaterialSelective(PolicyInfoDeclareMaterial policyInfoDeclareMaterial);

    /**
     * 刪除
     * @author hetao
     * @date 2021/07/26
     **/
    int deletePolicyInfoDeclareMaterialByPrimaryKey(@Param("id") String id);

    /**
     * 更新
     * @author hetao
     * @date 2021/07/26
     **/
    int updatePolicyInfoDeclareMaterialByPrimaryKey(PolicyInfoDeclareMaterial policyInfoDeclareMaterial);

    /**
     * 更新
     * @author hetao
     * @date 2021/07/26
     **/
    int updatePolicyInfoDeclareMaterialByPrimaryKeySelective(PolicyInfoDeclareMaterial policyInfoDeclareMaterial);

    /**
     * 根据主键查询
     * @author hetao
     * @date 2021/07/26
     **/
    PolicyInfoDeclareMaterial searchPolicyInfoDeclareMaterialByPrimaryKey(@Param("id") String id);

    /**
     * 根据matterId删除 申报材料
     * @param id
     */
    void deletePolicyInfoDeclareMaterialByMatterId(@Param("matterId")  long id);

    /**
     * 批量插入
     * @param policyInfoDeclareMaterials
     */
    void batchCreatePolicyInfoDeclareMaterial(@Param("policyInfoDeclareMaterials") List<PolicyInfoDeclareMaterial> policyInfoDeclareMaterials);

    List<PolicyInfoDeclareMaterial> searchPolicyInfoDeclareMaterialByMatterId(@Param("matterId")  long id);
}
